using UnityEngine;

namespace Script.CreatureEditor
{
	public class Idle : EditorAction
	{
		public Idle(EditorController editorController)
			: base(editorController)
		{
		}

		public override void Update()
		{
			if (!Input.GetMouseButtonDown(0))
			{
				return;
			}
			Transform transform = WskazanyObiekt();
			if ((bool)transform)
			{
				if (transform.GetSiblingIndex() % 2 != 0)
				{
					transform = editor.GetCopy(transform);
				}
				editor.improvementInfo = editor.improvementsInfo[transform.name];
				editor.BeginAction(new Improvement(editor, transform, editor.GetCopy(transform), true));
			}
		}
	}
}
